#include "Log.h"

bool Log::verbose_mode = false;
std::stringstream Log::log_oss;

void Log::debug(std::string message) {
	std::cout << "[DEBUG] " << message << "." << std::endl;
}

void Log::debug() {
	std::cout << "[DEBUG] " << Log::log_oss.str() << "." << std::endl;
	log_oss.str("");
}

void Log::error(std::string message) {
	std::cerr << "[ERROR] " << message << "." << std::endl;
}

void Log::error() {
	std::cout << "[ERROR] " << log_oss.str() << "." << std::endl;
	log_oss.str("");
}

void Log::warning(std::string message) {
	std::cout << "[WARN] " << message << "." << std::endl;
}

void Log::warning() {
	std::cout << "[WARN] " << log_oss.str() << "." << std::endl;
	log_oss.str("");
}

void Log::verbose(std::string message) {
	if (verbose_mode)
		std::cout << "[SERVER] " << message << "." << std::endl;
}

void Log::verbose() {
	if (verbose_mode)
		std::cout << "[SERVER] " << log_oss.str() << "." << std::endl;
	log_oss.str("");
}
